package com.coincalf.wallet.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.coincalf.framework.dto.CoinWithdrawDTO;
import com.coincalf.framework.dto.WithdrawResultDTO;
import com.coincalf.framework.http.Response;
import com.coincalf.wallet.blockchain.bean.TransInfo;
import com.coincalf.wallet.entity.CoinWithdraw;

import java.util.List;

/**
 * <p>
 * 数字货币提现 服务类
 * </p>
 *
 * @author crow
 * @since 2018-05-16
 */
public interface CoinWithdrawService extends IService<CoinWithdraw> {

    /**
     * 获取充值记录集合
     */
    Page<CoinWithdraw> selectOutRecharges(Page<CoinWithdraw> page, long agencyUserId, String userName, long orderId, Integer status, long coinId, long parentId, String createTime);

    /**
     * 获取充值记录统计
     */
    Response selectOutRechargesTotal(long agencyUserId);

    /**
     * 查询链上打币成功，尚未扣除用户资金账户额度
     * @return
     */
    List<CoinWithdrawDTO> queryPendingRecord();

    /**
     * 已审核通过，未打币
     * @return
     */
    List<CoinWithdrawDTO> queryPassedRecordByCoinName(String coinName);


    List<CoinWithdrawDTO> querySendCoiningByCoinName(String coinName);

    /**
     * 修改打币状态
     * @param id 主键
     * @param status 状态
     * @return
     */
    boolean modifyWithdrawStatus(Long id, Integer status);

    Long applyWithdraw(CoinWithdraw coinWithdraw);

    public TransInfo sendCoin(TransInfo transInfo);

    public boolean updateTxStatus(WithdrawResultDTO withdrawResultDTO);

    public boolean updateTxId(WithdrawResultDTO withdrawResultDTO);
}
